import 'package:flutter_demo/config/config.dart';
import 'package:logger/logger.dart';

class _LogFilter extends LogFilter {
  @override
  bool shouldLog(LogEvent event) {
    return Config.debug;
  }
}

class LogHelper {
  static final _log = Logger(
    filter: _LogFilter(),
  );

  static void t(message) {
    _log.t(message);
  }

  static void d(message) {
    _log.e(message);
  }

  static void i(message) {
    _log.i(message);
  }

  static void w(message) {
    _log.w(message);
  }

  static void e(message) {
    _log.e(message);
  }

  static void f(message) {
    _log.f(message);
  }
}
